package com.d0330;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class TestRefectValue {
    public static void main(String[] args) {
        try {
            FileReader fr=new FileReader(new File("src\\com\\d0330\\config.properties"));
            Properties properties=new Properties();
            properties.load(fr);
            Class clazz=Class.forName(properties.getProperty("todoClass"));
            System.out.println(clazz.newInstance());
            //Object obj=clazz.newInstance();
            /*if(obj instanceof Account){
                System.out.println((Account)obj);
            }else if(obj instanceof Employee){
                System.out.println((Employee)obj);
            }*/
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
